<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>跳转提示</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head>
<body>
<div class="layui-fluid">
    <div class="layadmin-tips" style="text-align: center;">
        <?php switch ($code) {?>
        <?php case 1:?>
        <h1><img src="/theme/system/static/smile.svg"></h1>
        <?php break;?>
        <?php case 0:?>
        <h1><img src="/theme/system/static/cry.svg"></h1>
        <?php break;?>
        <?php } ?>
        <div class="layui-text" style="font-size: 20px;max-width: 500px;margin: 30px auto;padding-top: 20px;border-top: 5px solid #009688;">
            <p>{$msg}</p>
            {php}if($wait != '-1'){{/php}
                <p style="font-size: 10px;margin-top: 10px;"><a id="href" href="{$url}">跳转</a> 等待时间： <b id="wait">{$wait}</b></p>
            {php}}else{{/php}
            {php}}{/php}
        </div>
    </div>
</div>
<script>
    (function(){
        {php}if($wait != '-1'){{/php}
        var wait = document.getElementById('wait'),
            href = document.getElementById('href').href;
        var interval = setInterval(function(){
            var time = --wait.innerHTML;
            if(time <= 0) {
                location.href = href;
                clearInterval(interval);
            };
        }, 1000);
        {php}}{/php}
    })();
</script>
</body>
</html>